<script src="/statics/js/layer.js"></script>
<!-- 头部开始 -->
<div class="header">
<!--    <div class="header_r"><img src="<?=session('loginImg')?>" width="30"></div>-->
    <div class="header_l"><a href="javascript:history.back(-1)"></a></div>
    <div class="header_m">退货物流</div>
</div>
<!-- 头部结束 -->

<!--订单详情开始-->
<div class="dingdan" style="margin:20px auto 10px">
    <div class="dingdan-xx">订单编号：<?=I('get.orderId')?></div>
    
    <div class="dingdan-list">
        <div class="dingdan-list-zt"><i>商品信息</i></div>
        <?php if($collectData){$nums = 0;foreach($collectData AS $val){?>
        <ul>
            <li class="dingdan-list-li1"><a href="/goods/detail/id/<?=$val['goods_id']?>/sek/<?=mySpreadSek($val['cust_id'])?>"><img src="<?=transUrl($val['goods_pic'])?>" width="90%" height="90%"></a></li>
            <li class="dingdan-list-li2"><a href="/goods/detail/id/<?=$val['goods_id']?>/sek/<?=mySpreadSek($val['cust_id'])?>"><?=$val['goods_title']?><p>规格：<?=$val['goods_attr']?></p></a></li>
            <li class="dingdan-list-li3"><?=$val['pay_price']?>元<p>×<?=$val['pay_nums']?><?=$val['goods_attr']?></p></li>
        </ul>
        <?php $nums += $val['pay_nums'];}}?>
        <div class="dingdan-list-order"><span>合计：<i>¥<?=$orderData['order_amount']?></i> </span>共 <?=$nums?> 件商品</div>
    </div>
</div>

<form action="/order/reback" method="post" id="formid">
<?php $getComps = getSysconfig('expressComp');?>
<div class="dingdan-list">
       <div class="dingdan-list-zt"><i style="color:#666;">收货人&nbsp;&nbsp;&nbsp;&nbsp;：{{$refund_address[0][1]}}</i></div>
       <div class="dingdan-list-order">联系电话：{{$refund_address[1][1]}}</div>
       <div class="dingdan-list-order">退货地址：{{$refund_address[2][1]}}</div>
</div>
<div class="dingdan-liyou3">
<span>快递公司：</span>
	<select id="rtype" name="expressname">
    	<option value="">请选择物流公司</option>
    	<?php foreach(explode(',',$getComps) AS $vall){?>
        <option value="<?=$vall?>"><?=$vall?></option>
        <?php }?>
        <option value="4">其他</option>
    </select>
</div>
<input type="hidden" value="1" name="dosubmit" />
<input type="hidden" value="<?=I('get.orderId')?>" name="orderId" />
<div class="kuaidi-name" style="display:none">快递公司：<input type="text" name="strexpress" id="strexpress" class="ly3-hao" placeholder="请输入物流公司名称"></div>
<div class="kuaidi-hao">物流单号：<input type="text" class="ly3-hao" name="expressnum" id="expressnum" placeholder="请输入快递单号"></div>
<div class="dingdan2-back"><a href="javascript:void(0)" id="putSubmit">确认提交</a></div>
<!--订单详情结束-->

</form>
 <script>
 $(function(){
	 $('#putSubmit').click(function(){
		 if(!$('#rtype').val()){
			 layer.msg('物流公司必须选择', {icon: 0});
		 }else if($('#rtype').val() == '4' && !$('#strexpress').val()){
			 layer.msg('请填写物流公司名称', {icon: 0});
		 }else if(!$('#expressnum').val()){
			 layer.msg('物流单号不能为空', {icon: 0});
		 }else{
			 $('#formid').submit();
		 }
	 });

     $('select').change(function(){
		//$('.kuaidi-name').css('display','block')
		if($(this).val() == 4){
			$('.kuaidi-name').css('display','block');
		}else{
			$('.kuaidi-name').css('display','none');
		}
	})

 });
 </script>